<div class="adminnavi">
  <a href="./index.php"><{$smarty.const._MI_MILEAGE_LANG_MILEAGE}></a>
  &raquo;&raquo; <a href="./index.php?action=MileList"><{$smarty.const._MI_MILEAGE_LANG_MILE_LIST}></a>
  <{if $actionForm->get('mile_id')}>
    &raquo;&raquo; <{$smarty.const._MI_MILEAGE_ADMENU_MILE_EDIT}>
  <{else}>
    &raquo;&raquo; <{$smarty.const._MI_MILEAGE_ADMENU_MILE_NEW}>
  <{/if}>
</div>

<h3>
  <{if $actionForm->get('mile_id')}>
    <{$smarty.const._MI_MILEAGE_ADMENU_MILE_EDIT}>
  <{else}>
    <{$smarty.const._MI_MILEAGE_ADMENU_MILE_NEW}>
  <{/if}>
</h3>

<{if $actionForm->hasError()}>
  <ul class="error">
    <{foreach item=message from=$actionForm->getErrorMessages()}>
      <li><{$message|xoops_escape}></li>
    <{/foreach}>
  </ul>
<{/if}>

<form action="index.php?action=MileEdit" method="post">
  <table class="outer">
    <tbody>
      <tr>
        <th class="head"><{$smarty.const._MD_MILEAGE_LANG_NAME}></th>
        <td class="<{cycle values="odd,even"}>">
          <{xoops_input type=text name=name value=$actionForm->get('name') size=50 maxlength=255}>
        </td>
      </tr>

      <tr>
        <th class="head"><{$smarty.const._MD_MILEAGE_LANG_POINT}></th>
        <td class="<{cycle values="odd,even"}>">
          <{xoops_input type=text name=point value=$actionForm->get('point')}>
        </td>
      </tr>

      <tr>
        <th class="head"><{$smarty.const._MD_MILEAGE_LANG_URL}></th>
        <td class="<{cycle values="odd,even"}>">
          <{xoops_input type=text name=url value=$actionForm->get('url') size=50 maxlength=255}>
          &nbsp;
          <{xoops_input type=checkbox name=suburl value=1 default=$actionForm->get('suburl')}> <{$smarty.const._MD_MILEAGE_LANG_SUBURL}>
          <br />
          <a href="#" onClick="if (document.getElementById('legacy_xoopsform_url').value=='') document.getElementById('legacy_xoopsform_url').value='<{$smarty.const.XOOPS_URL}>/';return false;"><{$smarty.const.XOOPS_URL}>/</a>
          &nbsp;|&nbsp;
          <a href="#" onClick="if (document.getElementById('legacy_xoopsform_url').value=='') document.getElementById('legacy_xoopsform_url').value='login';return false;"><{$smarty.const._MD_MILEAGE_LANG_LOGIN}></a>
          &nbsp;|&nbsp;
          <a href="#" onClick="if (document.getElementById('legacy_xoopsform_url').value=='') document.getElementById('legacy_xoopsform_url').value='register';return false;"><{$smarty.const._MD_MILEAGE_LANG_REGISTER}></a>
          &nbsp;|&nbsp;
          <a href="#" onClick="if (document.getElementById('legacy_xoopsform_url').value=='') document.getElementById('legacy_xoopsform_url').value='ticket:';return false;"><{$smarty.const._MD_MILEAGE_LANG_USE_TICKET}></a>
        </td>
      </tr>

      <tr>
        <th class="head"><{$smarty.const._MD_MILEAGE_LANG_INTERVAL}></th>
        <td class="<{cycle values="odd,even"}>">
          <{$interval_selector}>
        </td>
      </tr>

    <{if $cattree}>
      <tr>
        <th class="head"><{$smarty.const._MD_MILEAGE_LANG_GROUP}></th>
        <td class="<{cycle values="odd,even"}>">
          <{foreach from=$cattree item=cat}>
            [<{xoops_input type=checkbox name=group[] value=$cat.cat_id|xoops_escape default=$cat.default}> <{$cat.cat_id|xoops_escape}>:<{$cat.cat_title|xoops_escape}>]&nbsp;
          <{/foreach}>
        </td>
      </tr>
    <{/if}>

    </tbody>
    <tfoot>
      <tr>
        <td class="foot" colspan="2">
          <{xoops_token form=$actionForm}>
          <{xoops_input type=hidden name=mile_id value=$actionForm->get('mile_id')}>
          <{xoops_input type=hidden name=uid value=$actionForm->get('uid')}>
          <{xoops_input type=hidden name=reg_unixtime value=$actionForm->get('reg_unixtime')}>
          <input type="submit" value="<{$smarty.const._SUBMIT}>" />
          <input type="submit" value="<{$smarty.const._CANCEL}>" name="_form_control_cancel" />
        </td>
      </tr>
    </tfoot>
  </table>
</form>
